package com.itlong.cloud.POJO.DTO.smartcard;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;

import java.io.Serializable;

/**
 * <desc>
 *      与旺龙一卡通对接-住户信息传输对象（push和pull均使用）
 * </desc>
 *
 * @createDate 2017-11-09
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SmartCardSyncDataPullUserBasisInfoDTO implements Serializable{

    //项目Id
//    private String projectId;

    //用户手机号
    private String userPhone;

    //用户邮箱
    private String userEmail;

    //用户姓名
    private String userName;

    //软卡号
    private String cardNum;

    //修改时间。13位时间戳
//    private String modifyDate;

//    //操作类型
//    private Integer dataOperType;

    //住户项目状态
    private Integer userStatus;

    @JSONField(serialize = false, deserialize = false)
    public String getDataUid(){
        String phone = StringUtils.isBlank(userPhone)? "": userPhone;
        String email = StringUtils.isBlank(userEmail)? "":userEmail;
        return phone + email;
    }
}
